<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>

<div class="title"><?php echo __('Photo gallery list'); ?></div>

<div class="naujiena">

<?php if( !empty($arBranch) ): ?>

    <?php foreach($arBranch as $tree): ?>

        <?php echo $tree['obj']->getName() ?><br />

        <?php if( $tree['obj']->getChildrenQnt() ): ?>
            <?php foreach($tree['children'] as $child): ?>
                <?php echo link_to($child['obj']->getName(), 'tree/test?id=' . $child['obj']->getId()) ?><br />
            <?php endforeach; ?>
        <?php endif; ?>
        
        <?php if( $tree['obj']->getObjId() ): ?>
            Display TextModule w/ ID <?php echo $tree['obj']->getObjId() ?><br />
        <?php endif; ?>


    <?php endforeach; ?>

<?php endif; ?>
</div>